{extend name="public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">公告管理</li>
        <li class="active">公告列表</li>
    </ul>
    <div class="row">
        <div class="col-sm-12">
            <div class="panel-group m-b" id="accordion2">
                {assign name='ceng' value='1'}
                {volist name='notice' id='vo'}
                <div class="panel panel-default">
                    <div class="panel-heading "> <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne{$vo.id}"> {$vo.title} </a>
                    </div>
                    <div id="collapseOne{$vo.id}" {if condition="$ceng++ eq 1"} class="panel-collapse in" {else /} class="panel-collapse collapse" {/if} >
                        <div class="panel-body text-sm">
                            {$vo.content|default=''|htmlspecialchars_decode}
                            <div class="text-right"><a>{$vo.time}</a> <a href="/master/index/noticeedit.html?id={$vo.id}" class="text-danger">编辑</a>&nbsp;<a href="javascript:void(0);" onclick="noticedel('{$vo.id}')" class="text-danger">删除</a></div>
                        </div>
                    </div>
                </div>
                {/volist}
            </div>
        </div>
    </div>
</section>
{/block}
{block name="footer"}
<script>
    function noticedel(id) {
        $.ajax({
           type:"POST",
            url:"/master/index/noticedel/id/"+id,
            success: function (data) {
                Onsuccess(data);
            }
        });
    }
</script>
{/block}